from selenium.webdriver.common.by import By

from base import Base
class Page(Base):
    # 点击搜索
    def suosou(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="搜商品名称 作者 出版社 ISBN"]')
        ele=self.find_me(loc)
        return ele
    # 输入内容
    def shuru(self):
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.find_me(loc)
        return ele
    # 点击搜索按钮
    def annui(self):
        loc=(By.ID,'com.kongfz.app:id/tvSearch')
        ele=self.find_me(loc)
        return ele
    # 断言
    def dduanyan(self):
        loc=(By.ID,'com.kongfz.app:id/fl1')
        ele=self.find_me(loc).text
        return ele

